// @Author EthanScriptOn
// @Desc
package config_source_loader

import (
	"gitee.com/fatzeng/srf_switch_basic_components/node"
	"gitee.com/fatzeng/srf_switch_config/config_define"
)

type SourceLoaderResult struct {
	segmentsInformation []*SegmentInformation
	configSourceType    config_define.ConfigSourceType
	extendedInformation interface{}
}

type SegmentInformation struct {
	segmentOriginalNode node.Node
	segmentLoaderResult map[string]interface{}
}

func (s *SegmentInformation) GetSegmentOriginalNode() node.Node {
	return s.segmentOriginalNode
}

func (s *SegmentInformation) SetSegmentOriginalNode(segmentOriginalNode node.Node) {
	s.segmentOriginalNode = segmentOriginalNode
}

func (s *SegmentInformation) GetSegmentLoaderResult() map[string]interface{} {
	return s.segmentLoaderResult
}

func (s *SegmentInformation) SetSegmentLoaderResult(segmentLoaderResult map[string]interface{}) {
	s.segmentLoaderResult = segmentLoaderResult
}

func (s *SourceLoaderResult) AppendSegmentsInformation(segmentsInformation *SegmentInformation) {
	s.segmentsInformation = append(s.segmentsInformation, segmentsInformation)
}

func (s *SourceLoaderResult) SetSegmentsInformation(segmentsInformation []*SegmentInformation) {
	s.segmentsInformation = segmentsInformation
}

func (s *SourceLoaderResult) GetSegmentsInformation() []*SegmentInformation {
	return s.segmentsInformation
}

func (s *SourceLoaderResult) GetConfigSourceType() config_define.ConfigSourceType {
	return s.configSourceType
}

func (s *SourceLoaderResult) SetConfigSourceType(configSourceType config_define.ConfigSourceType) {
	s.configSourceType = configSourceType
}

func (s *SourceLoaderResult) GetExtendedInformation() interface{} {
	return s.extendedInformation
}

func (s *SourceLoaderResult) SetExtendedInformation(extendedInformation interface{}) {
	s.extendedInformation = extendedInformation
}
